package com.example.springboot.jasypt.demo.controller;

/*
 *  @ author  zengqingfa
 *  @ created in    2020/2/19  22:02
 *
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/jasypt")
public class JasyptController {

    @Autowired
    Environment environment;

    @RequestMapping("/hello")
    public String hello(){
        String str=environment.getProperty("person.username")+"==="+environment.getProperty("person.password");
        return str;
    }

}
